using HKB.Common;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics;
namespace HKB.Data.Dal.S_BankTableAdapters
{
	[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), DataObject(true), HelpKeyword("vs.data.TableAdapter"), Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory("code"), ToolboxItem(true)]
	public class HL_BankTableAdapter : Component
	{
		private SqlDataAdapter _adapter;
		private SqlConnection _connection;
		private SqlCommand[] _commandCollection;
		private bool _clearBeforeFill;
		[System.Diagnostics.DebuggerNonUserCode]
		private SqlDataAdapter Adapter
		{
			get
			{
				if (this._adapter == null)
				{
					this.InitAdapter();
				}
				return this._adapter;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		internal SqlConnection Connection
		{
			get
			{
				if (this._connection == null)
				{
					this.InitConnection();
				}
				return this._connection;
			}
			set
			{
				this._connection = value;
				if (this.Adapter.InsertCommand != null)
				{
					this.Adapter.InsertCommand.Connection = value;
				}
				if (this.Adapter.DeleteCommand != null)
				{
					this.Adapter.DeleteCommand.Connection = value;
				}
				if (this.Adapter.UpdateCommand != null)
				{
					this.Adapter.UpdateCommand.Connection = value;
				}
				for (int i = 0; i < this.CommandCollection.Length; i++)
				{
					if (this.CommandCollection[i] != null)
					{
						this.CommandCollection[i].Connection = value;
					}
				}
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		protected SqlCommand[] CommandCollection
		{
			get
			{
				if (this._commandCollection == null)
				{
					this.InitCommandCollection();
				}
				return this._commandCollection;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public bool ClearBeforeFill
		{
			get
			{
				return this._clearBeforeFill;
			}
			set
			{
				this._clearBeforeFill = value;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public HL_BankTableAdapter()
		{
			this.ClearBeforeFill = true;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitAdapter()
		{
			this._adapter = new SqlDataAdapter();
			DataTableMapping dataTableMapping = new DataTableMapping();
			dataTableMapping.SourceTable = "Table";
			dataTableMapping.DataSetTable = "HL_Bank";
			dataTableMapping.ColumnMappings.Add("BankID", "BankID");
			dataTableMapping.ColumnMappings.Add("BankTargetName", "BankTargetName");
			dataTableMapping.ColumnMappings.Add("ExchangeRate", "ExchangeRate");
			dataTableMapping.ColumnMappings.Add("Charge", "Charge");
			dataTableMapping.ColumnMappings.Add("BankAccess", "BankAccess");
			dataTableMapping.ColumnMappings.Add("EnableBank", "EnableBank");
			dataTableMapping.ColumnMappings.Add("BankShortName", "BankShortName");
			dataTableMapping.ColumnMappings.Add("BankName", "BankName");
			dataTableMapping.ColumnMappings.Add("Accounts", "Accounts");
			dataTableMapping.ColumnMappings.Add("CardNum", "CardNum");
			dataTableMapping.ColumnMappings.Add("HolderName", "HolderName");
			dataTableMapping.ColumnMappings.Add("BankIntro", "BankIntro");
			dataTableMapping.ColumnMappings.Add("BankPic", "BankPic");
			dataTableMapping.ColumnMappings.Add("IsDefault", "IsDefault");
			dataTableMapping.ColumnMappings.Add("OrderID", "OrderID");
			dataTableMapping.ColumnMappings.Add("IsDisabled", "IsDisabled");
			dataTableMapping.ColumnMappings.Add("UserID", "UserID");
			this._adapter.TableMappings.Add(dataTableMapping);
			this._adapter.DeleteCommand = new SqlCommand();
			this._adapter.DeleteCommand.Connection = this.Connection;
			this._adapter.DeleteCommand.CommandText = "DELETE FROM [HlShop_Bank] WHERE (([BankID] = @Original_BankID))";
			this._adapter.DeleteCommand.CommandType = CommandType.Text;
			this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_BankID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "BankID", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.InsertCommand = new SqlCommand();
			this._adapter.InsertCommand.Connection = this.Connection;
			this._adapter.InsertCommand.CommandText = "INSERT INTO [HlShop_Bank] ([BankShortName], [BankName], [Accounts], [CardNum], [HolderName], [BankIntro], [BankPic], [IsDefault], [OrderID], [IsDisabled], [UserID]) VALUES (@BankShortName, @BankName, @Accounts, @CardNum, @HolderName, @BankIntro, @BankPic, @IsDefault, @OrderID, @IsDisabled, @UserID)";
			this._adapter.InsertCommand.CommandType = CommandType.Text;
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@BankShortName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "BankShortName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@BankName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "BankName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Accounts", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "Accounts", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@CardNum", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "CardNum", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@HolderName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "HolderName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@BankIntro", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "BankIntro", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@BankPic", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "BankPic", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@IsDefault", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsDefault", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@OrderID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "OrderID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@IsDisabled", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsDisabled", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand = new SqlCommand();
			this._adapter.UpdateCommand.Connection = this.Connection;
			this._adapter.UpdateCommand.CommandText = "UPDATE [HlShop_Bank] SET [BankShortName] = @BankShortName, [BankName] = @BankName, [Accounts] = @Accounts, [CardNum] = @CardNum, [HolderName] = @HolderName, [BankIntro] = @BankIntro, [BankPic] = @BankPic, [IsDefault] = @IsDefault, [OrderID] = @OrderID, [IsDisabled] = @IsDisabled, [UserID] = @UserID WHERE (([BankID] = @Original_BankID))";
			this._adapter.UpdateCommand.CommandType = CommandType.Text;
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@BankShortName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "BankShortName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@BankName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "BankName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Accounts", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "Accounts", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@CardNum", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "CardNum", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@HolderName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "HolderName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@BankIntro", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "BankIntro", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@BankPic", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "BankPic", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@IsDefault", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsDefault", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@OrderID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "OrderID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@IsDisabled", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsDisabled", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_BankID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "BankID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitConnection()
		{
			this._connection = new SqlConnection();
			this._connection.ConnectionString = Conn.CurrenConnectionStrings;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitCommandCollection()
		{
			this._commandCollection = new SqlCommand[8];
			this._commandCollection[0] = new SqlCommand();
			this._commandCollection[0].Connection = this.Connection;
			this._commandCollection[0].CommandText = "SELECT BankID, BankShortName, BankName, Accounts, CardNum, HolderName, BankIntro, \r\n      BankPic, IsDefault, OrderID, IsDisabled, UserID\r\nFROM HlShop_Bank order by OrderID";
			this._commandCollection[0].CommandType = CommandType.Text;
			this._commandCollection[1] = new SqlCommand();
			this._commandCollection[1].Connection = this.Connection;
			this._commandCollection[1].CommandText = "DELETE  [HlShop_Bank] WHERE (([BankID] = @BankID) AND [UserID]=@UserID)";
			this._commandCollection[1].CommandType = CommandType.Text;
			this._commandCollection[1].Parameters.Add(new SqlParameter("@BankID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "BankID", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[1].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[2] = new SqlCommand();
			this._commandCollection[2].Connection = this.Connection;
			this._commandCollection[2].CommandText = "SELECT Accounts, BankID, BankIntro, BankName, BankPic, BankShortName, CardNum, HolderName, IsDefault, IsDisabled, OrderID, UserID FROM HlShop_Bank WHERE (UserID = @userid) AND (BankShortName = @bankshortname)";
			this._commandCollection[2].CommandType = CommandType.Text;
			this._commandCollection[2].Parameters.Add(new SqlParameter("@userid", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@bankshortname", SqlDbType.NVarChar, 20, ParameterDirection.Input, 0, 0, "BankShortName", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3] = new SqlCommand();
			this._commandCollection[3].Connection = this.Connection;
			this._commandCollection[3].CommandText = "SELECT Accounts, BankID, BankIntro, BankName, BankPic, BankShortName, CardNum, HolderName, IsDefault, IsDisabled, OrderID, UserID FROM HlShop_Bank WHERE (BankID = @BankID) ORDER BY OrderID";
			this._commandCollection[3].CommandType = CommandType.Text;
			this._commandCollection[3].Parameters.Add(new SqlParameter("@BankID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "BankID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4] = new SqlCommand();
			this._commandCollection[4].Connection = this.Connection;
			this._commandCollection[4].CommandText = "SELECT Accounts, BankID, BankIntro, BankName, BankPic, BankShortName, CardNum, HolderName, IsDefault, IsDisabled, OrderID, UserID FROM HlShop_Bank WHERE (UserID = @UserID)";
			this._commandCollection[4].CommandType = CommandType.Text;
			this._commandCollection[4].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[5] = new SqlCommand();
			this._commandCollection[5].Connection = this.Connection;
			this._commandCollection[5].CommandText = "SELECT BankID, BankShortName, BankName, Accounts, CardNum, HolderName, BankIntro, \r\n      BankPic, IsDefault, OrderID, IsDisabled, UserID\r\nFROM HlShop_Bank \r\nWHERE IsDisabled=0 AND UserID=@UserID\r\norder by IsDefault desc";
			this._commandCollection[5].CommandType = CommandType.Text;
			this._commandCollection[5].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6] = new SqlCommand();
			this._commandCollection[6].Connection = this.Connection;
			this._commandCollection[6].CommandText = "PR_AddBank";
			this._commandCollection[6].CommandType = CommandType.StoredProcedure;
			this._commandCollection[6].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@BankShortName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@BankName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@Accounts", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@CardNum", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@HolderName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@BankIntro", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7] = new SqlCommand();
			this._commandCollection[7].Connection = this.Connection;
			this._commandCollection[7].CommandText = "UPDATE [HLShop_Bank] SET [IsDefault] = 1 WHERE (([BankID] = @BankID)) and UserID=@UserID ;\r\nUPDATE [HLShop_Bank] SET [IsDefault] = 0 WHERE (([BankID] != @BankID)) and UserID=@UserID\r\n\r\n";
			this._commandCollection[7].CommandType = CommandType.Text;
			this._commandCollection[7].Parameters.Add(new SqlParameter("@BankID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "BankID", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[DataObjectMethod(DataObjectMethodType.Select, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_Bank.HL_BankDataTable GetALLBank()
		{
			this.Adapter.SelectCommand = this.CommandCollection[0];
			S_Bank.HL_BankDataTable hL_BankDataTable = new S_Bank.HL_BankDataTable();
			this.Adapter.Fill(hL_BankDataTable);
			return hL_BankDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_Bank.HL_BankDataTable GetBankByBankNameUserID(int? userid, string bankshortname)
		{
			this.Adapter.SelectCommand = this.CommandCollection[2];
			if (userid.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = userid.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			if (bankshortname == null)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = bankshortname;
			}
			S_Bank.HL_BankDataTable hL_BankDataTable = new S_Bank.HL_BankDataTable();
			this.Adapter.Fill(hL_BankDataTable);
			return hL_BankDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_Bank.HL_BankDataTable GetBankByID(int BankID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[3];
			this.Adapter.SelectCommand.Parameters[0].Value = BankID;
			S_Bank.HL_BankDataTable hL_BankDataTable = new S_Bank.HL_BankDataTable();
			this.Adapter.Fill(hL_BankDataTable);
			return hL_BankDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_Bank.HL_BankDataTable GetBankByUserID(int? UserID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[4];
			if (UserID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = UserID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			S_Bank.HL_BankDataTable hL_BankDataTable = new S_Bank.HL_BankDataTable();
			this.Adapter.Fill(hL_BankDataTable);
			return hL_BankDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_Bank.HL_BankDataTable GetBankByUserIDNotDisabled(int? UserID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[5];
			if (UserID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = UserID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			S_Bank.HL_BankDataTable hL_BankDataTable = new S_Bank.HL_BankDataTable();
			this.Adapter.Fill(hL_BankDataTable);
			return hL_BankDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_Bank.HL_BankDataTable GetIDEntity(string BankShortName, string BankName, string Accounts, string CardNum, string HolderName, string BankIntro, int? UserID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[6];
			if (BankShortName == null)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = BankShortName;
			}
			if (BankName == null)
			{
				this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[2].Value = BankName;
			}
			if (Accounts == null)
			{
				this.Adapter.SelectCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[3].Value = Accounts;
			}
			if (CardNum == null)
			{
				this.Adapter.SelectCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[4].Value = CardNum;
			}
			if (HolderName == null)
			{
				this.Adapter.SelectCommand.Parameters[5].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[5].Value = HolderName;
			}
			if (BankIntro == null)
			{
				this.Adapter.SelectCommand.Parameters[6].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[6].Value = BankIntro;
			}
			if (UserID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[7].Value = UserID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[7].Value = System.DBNull.Value;
			}
			S_Bank.HL_BankDataTable hL_BankDataTable = new S_Bank.HL_BankDataTable();
			this.Adapter.Fill(hL_BankDataTable);
			return hL_BankDataTable;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_Bank.HL_BankDataTable dataTable)
		{
			return this.Adapter.Update(dataTable);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_Bank dataSet)
		{
			return this.Adapter.Update(dataSet, "HL_Bank");
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow dataRow)
		{
			return this.Adapter.Update(new DataRow[]
			{
				dataRow
			});
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow[] dataRows)
		{
			return this.Adapter.Update(dataRows);
		}
		[DataObjectMethod(DataObjectMethodType.Delete, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Delete(int Original_BankID)
		{
			this.Adapter.DeleteCommand.Parameters[0].Value = Original_BankID;
			ConnectionState state = this.Adapter.DeleteCommand.Connection.State;
			if ((this.Adapter.DeleteCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.DeleteCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.DeleteCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.DeleteCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Insert, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Insert(string BankShortName, string BankName, string Accounts, string CardNum, string HolderName, string BankIntro, string BankPic, bool? IsDefault, int? OrderID, bool? IsDisabled, int? UserID)
		{
			if (BankShortName == null)
			{
				this.Adapter.InsertCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[0].Value = BankShortName;
			}
			if (BankName == null)
			{
				this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[1].Value = BankName;
			}
			if (Accounts == null)
			{
				this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[2].Value = Accounts;
			}
			if (CardNum == null)
			{
				this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[3].Value = CardNum;
			}
			if (HolderName == null)
			{
				this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[4].Value = HolderName;
			}
			if (BankIntro == null)
			{
				this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[5].Value = BankIntro;
			}
			if (BankPic == null)
			{
				this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[6].Value = BankPic;
			}
			if (IsDefault.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[7].Value = IsDefault.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value;
			}
			if (OrderID.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[8].Value = OrderID.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value;
			}
			if (IsDisabled.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[9].Value = IsDisabled.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[9].Value = System.DBNull.Value;
			}
			if (UserID.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[10].Value = UserID.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[10].Value = System.DBNull.Value;
			}
			ConnectionState state = this.Adapter.InsertCommand.Connection.State;
			if ((this.Adapter.InsertCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.InsertCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.InsertCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.InsertCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(string BankShortName, string BankName, string Accounts, string CardNum, string HolderName, string BankIntro, string BankPic, bool? IsDefault, int? OrderID, bool? IsDisabled, int? UserID, int Original_BankID)
		{
			if (BankShortName == null)
			{
				this.Adapter.UpdateCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[0].Value = BankShortName;
			}
			if (BankName == null)
			{
				this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[1].Value = BankName;
			}
			if (Accounts == null)
			{
				this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[2].Value = Accounts;
			}
			if (CardNum == null)
			{
				this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[3].Value = CardNum;
			}
			if (HolderName == null)
			{
				this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[4].Value = HolderName;
			}
			if (BankIntro == null)
			{
				this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[5].Value = BankIntro;
			}
			if (BankPic == null)
			{
				this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[6].Value = BankPic;
			}
			if (IsDefault.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[7].Value = IsDefault.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
			}
			if (OrderID.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[8].Value = OrderID.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value;
			}
			if (IsDisabled.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[9].Value = IsDisabled.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[9].Value = System.DBNull.Value;
			}
			if (UserID.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[10].Value = UserID.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[10].Value = System.DBNull.Value;
			}
			this.Adapter.UpdateCommand.Parameters[11].Value = Original_BankID;
			ConnectionState state = this.Adapter.UpdateCommand.Connection.State;
			if ((this.Adapter.UpdateCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.UpdateCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.UpdateCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.UpdateCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Delete, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int DeleteBank(int BankID, int? UserID)
		{
			SqlCommand sqlCommand = this.CommandCollection[1];
			sqlCommand.Parameters[0].Value = BankID;
			if (UserID.HasValue)
			{
				sqlCommand.Parameters[1].Value = UserID.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int SetDefault(int BankID, int? UserID)
		{
			SqlCommand sqlCommand = this.CommandCollection[7];
			sqlCommand.Parameters[0].Value = BankID;
			if (UserID.HasValue)
			{
				sqlCommand.Parameters[1].Value = UserID.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
	}
}
